export class LeaveType{
    id:number
    value:string

    constructor(id:number,value:string){
        this.id = id;
        this.value = value;
    }

    
}

export class FileType{
    id:string
    value:string

    constructor(id:string,value:string){
        this.id = id;
        this.value = value;
    }

    
}


 
export class LogItem{    
    label:string;
    value?:string|number;
    contents:LogItemContent[] ;
    labelClass?:string
   
    constructor(label:string,value?:string|number,contents?:LogItemContent[]){
        this.label = label;

        if(value || ''== value){
            this.value = value;
        }else{            
            this.value = '暂无'
        }
        
        if(contents){
            this.contents = contents;
        }else{
            this.contents = [];
        }
    }
}

export class LogItemContent{
    label:string;
    value?:string;
    cssClass?:string
    labelClass?:string

    constructor(label:string,value:string,cssClass?:string){
        this.label = label;
        this.value = value;
        this.cssClass = cssClass;

        //判断label长度，三个字符加样式
        if(label){
            var tempLabel = label.replace(/\s+/g, '');
            if('批复人' == tempLabel || tempLabel == '审批人' || tempLabel.length == 3){
                this.labelClass='paddingRight2'
            }
        }

        if(!cssClass){
            if(label.indexOf('意见') != -1 &&  value != '暂无'){
                this.cssClass = 'auditOpinion'
            }
        }
    }
}
 
/**
 * 过滤的公文类型
 */
export interface FilterDocType{
    all?:boolean
    receive?:boolean
    send?:boolean
    report?:boolean
    askLeave?:boolean
    seal?:boolean
    represent?:boolean
}

/*
* 每个列表页面需要缓存的数据
* 包括：搜索条件、显示的文档类型
*/
export interface ListViewData{
    key?:string
    filterType?:FilterDocType
}



/**
 * 当前视图
 */
export interface TabViewType{
    todo?:boolean
    toRead?:boolean
    redirect?:boolean
    done?:boolean
    favo?:boolean    
    my?:boolean
}

export interface DocTypeCountResult{
    allCount:number
    //-------公文流转流程----------------
    askLeaveCount:number
    receiveCount:number
    reportCount:number
    representCount:number
    sealCount:number
    sendCount:number
    
}

export interface GridReportProps{
    title?:string
    id:string
}
export interface AskLeave{
    user_name:string
    user_id:string
    college_name:string
    content:string
    leave_dest:string
    task_type:string
    post_level:string
    ask_leave_from:string
    ask_leave_to:string
    done:number
    leave_days:number
    LEAVE_SCHOOL_FEE:number
    LEAVE_SCHOOL_FEE_TYPE:String
    LEAVE_SCHOOL_FEE_USAGE:String
    LEAVE_INVITOR_FEE:Number
    LEAVE_INVITOR_FEE_USAGE:String
    LEAVE_OTHER_FEE:Number
    LEAVE_OTHER_FEE_USAGE:String

    groupFlag?:boolean //标记是否开始分组
}

export interface CarQueryResult{
    carInfoList:CarInfo[],
    asynDate:string//同步日期
}

export interface CarInfo {
    CPHM1:string
    CPHM1SYR:string
    DW:string
    GZH:string
    LXFS:string
    XB:string
    XM:string
    apply_status:number
    apply_type:number
    CRXSY:string
    XNDJDW:string
    CPH?:string
    TXRQ:string
    DJFZR:string
    DJFZRDH:string
    XY:string
    XH:string
    id:number
    CSRYSL?:number
}

export interface CarPark{
    IN_REMARK?:string
    id?:number
    IN_TIME?:string
    VOUCHER_NO:string
    OUT_TIME?:string
    IN_PASS_NAME?:string
    user_type:string
    staff_id?:string
    staff_name?:string
    college_name?:string
}

export interface CarParkQueryResult{
    carInfo:CarInfo,
    list:CarPark[],
    asynDate:string//同步日期
}

export interface PersonInfo {
    COLLEGE?:string
    STAFF_ID?:string
    NAME?:string
    DEPART?:string
    APOST?:string
    APOSTLEVEL_ID?:string
    STATUS_ID?:string
    CELL_PHONE?:string
}
export interface PersonQueryResult{
    personList:[]
    asynDate:string
}


export interface PersonVisitInfo {
    created_at?:string
    src_name?:string
    name?:string
    school_area?:string
    direction?:string
    org_name?:string
    job_no:string
    college_name?:string
}

export interface PersonVisitQueryResult{
    person:PersonInfo
    asynDate:string
    list:PersonVisitInfo[]
}